/*
 * @Author: sbotlp
 * @Email: sbotlp@sina.com
 * @Date: 2019-11-03 17:33:08
 * @LastEditTime: 2019-11-03 21:23:04
 * @Description: http://www.sbotlp.com.cn
 */
class Animal{
  constructor(name) {
    this.name = name
  }
  eat() {
    console.log(`${this.name} eat`);
  }
}
class Dog extends Animal {
  constructor(name) {
    super(name) // 只要有extends 必须需要super，super是继承的constructor
    this.name = name
  }
  say() {
    console.log(`${this.name} say`);
  }
}
class Person extends Dog{
  constructor(name){
    super(name)
    this.name = name
  }
  tiao() {
    console.log(`${this.name}, tiao`);
  }
}
const dog = new Dog('哈士奇');
dog.say();
dog.eat();
const lp = new Person('蓝萍');
lp.eat();
lp.say();
lp.tiao();